package com.wuzf.springcloud.service;

import com.wuzf.common.entity.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@Service
@FeignClient(value = "PROVIDER-PAYMENT", fallback = HystrixFallbackService.class)
public interface HystrixService {


    @PostMapping("/payment/ok")
    CommonResult ok();


    @PostMapping("/payment/error")
    CommonResult error();


    @PostMapping("/payment/timeout")
    CommonResult timeout();

    @GetMapping("/hystrix/timeout/{id}")
    String paymentInfo_TimeOut(@PathVariable("id") Integer id);
}